package com.net.Listener;

import org.springframework.context.ApplicationListener;
import org.springframework.stereotype.Component;

/**
 * Created by zhang yufei on 2017/12/6.
 */

@Component
public class DemoListener implements ApplicationListener<DemoEvent>{

    public void onApplicationEvent(DemoEvent event){
        String msg=event.getMsg();
        System.out.println("我（bean-demoListener）接收到了bean-demoPublisher发布消息："+msg);
    }
}
